<template>
	<view>
		<cu-custom bgColor="bg-gradual-blue" :isBack="true">
		  <block slot="content">我的</block>
		</cu-custom>
		<view class="padding solid">当前用户：{{userInfo.name}}</view>
		<view class="cu-list menu sm-border card-menu" style="margin-top:20upx">
			<view class="cu-item arrow">
				<view class="content" @tap="logout">
					<text class="cuIcon-circlefill text-grey"></text>
					<text class="text-grey">退出</text>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	import {
	  mapState,
	  mapMutations
	} from 'vuex';
	export default {
		data() {
			return {
				skin: false
				
			};
		},mounted(){
			
		},

		computed: {
			userInfo(){
				let userinfo = uni.getStorageSync("userInfo");
				if(userinfo){
					return JSON.parse(userinfo);
				}
				return {name:"失去连接"}
			}
		},
		methods: {
			navTo(url) {
				uni.navigateTo({
					url: url
				});
			},
			SwitchSex(e) {
				this.skin = e.detail.value
			},

			logout() {
				uni.removeStorageSync("userInfo")
				uni.reLaunch({
					url: '../index/index'
				});
			}
		}
	};
</script>
<style lang="scss">
	.switch-sex::after {
	    content: "\e716";
	}
	
	.switch-sex::before {
	    content: "\e7a9";
	}
</style>
